﻿using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using WebApplication2.Services;

namespace WebApplication2.Controllers
{
    [ApiController]
    [Route("my")]
    public class MyController : ControllerBase
    {
        private readonly IMyService _myService;

        public MyController(IMyService myService)
        {
            this._myService = myService;
        }


        [HttpGet("index/{name}")]
        public string Index(string name)
        {
            return _myService.SayHi(name);
        }

    }
}
